//auto gen by paipai.java.augogen ver 154
//author floatman
#ifndef _STORAGEDAO_STORAGE_H_
#define _STORAGEDAO_STORAGE_H_

#include <stdint.h>
#include <string>
#include <iostream>
#include "app_platform/help_macros.h"
#include "app_platform/intf_service.h"
#include "intf_storagedao.h"

#include "library/basic/singleton_t.h"
#include "library/basic/sync_lock.h"
#include "c2cent/library/log/CWTimeElf3.h"

#include <set>
#include <map>
#include <vector>
#include "erp/storage/ddo/disassemblebillddo_storage.h"
#include "erp/storage/ddo/losebillddo_storage.h"
#include "erp/storage/ddo/overflowbillddo_storage.h"
#include "erp/storage/ddo/stockddo_storage.h"
#include "erp/storage/ddo/stockcheckmasterddo_storage.h"
#include "erp/storage/ddo/disassemblebillfilterddo_storage.h"
#include "erp/storage/ddo/overflowbillorlosebillfilterddo_storage.h"
#include "erp/storage/ddo/stockbranch_relddo_storage.h"
#include "erp/storage/ddo/stockcheckfilterddo_storage.h"
#include "erp/storage/ddo/stockfilterddo_storage.h"

HEADER_SELF_DEFINE_START
/**
*  请在这里增加自定义包含的头文件，否则无法合并代码
**/
HEADER_SELF_DEFINE_END

namespace erp
{
namespace storage
{
namespace dao
{

#define STORAGEDAO_SERVICE_VERSION "ERP_STORAGE_DAO___STORAGEDAO__SERVICE_VERSION__1.0 2013-11-01 14:16:06"
const std::string STORAGEDAO_SERVICE_NOUSE = STORAGEDAO_SERVICE_VERSION;

SERVICE class CStorageDao : public IStorageDao{
public:
		CStorageDao(enum DeployMethod method = DEPLOY_STANDALONE);
		~CStorageDao();
		 void Reset();
		static int Initialize(IUserDefineCntl* pCntl = NULL);

public:
	 /**
	 *
	 *    写入仓库信息 
	 *
	 */
	EXPORT(0xc05e1801) uint32_t AddStock(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 const erp::storage::ddo::CStockDdo& oStockInfo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve,
		 uint64_t& ddwStockSysNo
		);

	 /**
	 *
	 *    逻辑删除仓库信息 
	 *
	 */
	EXPORT(0xc05e1802) uint32_t DeleteStock(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 const std::set<uint64_t> & setFStockSysNo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::map<uint64_t,uint32_t> & mapErrorCode,
		 std::map<uint64_t,std::string> & mapErrorMsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    修改仓库信息 
	 *
	 */
	EXPORT(0xc05e1803) uint32_t UpdateStock(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 const erp::storage::ddo::CStockDdo& oStockInfo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    根据ID获取仓库信息 
	 *
	 */
	EXPORT(0xc05e1804) uint32_t GetStockBySysNos(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const std::set<uint64_t> & setStockSysnoList,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::vector<erp::storage::ddo::CStockDdo> & vecStockList,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    根据filter获取仓库信息 
	 *
	 */
	EXPORT(0xc05e1805) uint32_t GetStockList(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::storage::ddo::CStockFilterDdo& oStockFilter,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 uint32_t& dwTotal,
		 std::vector<erp::storage::ddo::CStockDdo> & vecStockList,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    维护仓库与分支机构关系 
	 *
	 */
	EXPORT(0xc05e1806) uint32_t ModifyStockBranch_Rel(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 uint64_t ddwStockSysNo,
		 const std::set<uint64_t> & setBranchSysNos,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    查询仓库与分支机构关系 
	 *
	 */
	EXPORT(0xc05e1807) uint32_t GetStockBranch_RelBySysNo(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 uint64_t ddwStockSysNo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve,
		 std::vector<erp::storage::ddo::CStockBranch_RelDdo> & vecStockBranchList
		);

	 /**
	 *
	 *    写入报损/报溢表 
	 *
	 */
	EXPORT(0xc05e1808) uint32_t AddLoseBillOrOverFlowBill(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 const erp::storage::ddo::CLoseBillDdo& oLoseBillInfo,
		 const erp::storage::ddo::COverFlowBillDdo& oOverFlowBillInfo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve,
		 uint64_t& ddwOverFlowBillSysNo
		);

	 /**
	 *
	 *    逻辑删除报损/报溢表  
	 *
	 */
	EXPORT(0xc05e1809) uint32_t DeleteLoseBillOrOverFlowBill(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 const std::set<uint64_t> & setFLoseBillSysNo,
		 const std::set<uint64_t> & setFOverFlowBillSysNo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::map<uint64_t,uint32_t> & mapErrorCode,
		 std::map<uint64_t,std::string> & mapErrorMsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    修改报损/报溢表 
	 *
	 */
	EXPORT(0xc05e1810) uint32_t UpdataLoseBillOrOverFlowBill(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 const erp::storage::ddo::CLoseBillDdo& oLoseBillInfo,
		 const erp::storage::ddo::COverFlowBillDdo& oOverFlowBillInfo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    根据ID获取报损/报溢表信息 
	 *
	 */
	EXPORT(0xc05e1811) uint32_t GetLoseBillOrOverFlowBillBySysNos(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const std::set<uint64_t> & setLoseBillSysNoList,
		 const std::set<uint64_t> & setOverFlowSysNoList,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::vector<erp::storage::ddo::CLoseBillDdo> & vecLoseBillList,
		 std::vector<erp::storage::ddo::COverFlowBillDdo> & vecOverFlowList,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    根据filter获取报损/报溢表
	 *
	 */
	EXPORT(0xc05e1812) uint32_t GetLoseBillOrOverFlowBillList(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::storage::ddo::COverFlowBillOrLoseBillFilterDdo& oOverFlowBillOrLoseBillFilter,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 uint32_t& dwTotal,
		 std::vector<erp::storage::ddo::CLoseBillDdo> & vecLoseBillList,
		 std::vector<erp::storage::ddo::COverFlowBillDdo> & vecOverFlowList,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    拆装单创建 
	 *
	 */
	EXPORT(0xc05e1813) uint32_t AddDisassembleBill(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 const erp::storage::ddo::CDisassembleBillDdo& oDisassembleBillInfo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve,
		 uint64_t& ddwDisassembleBillSysNo
		);

	 /**
	 *
	 *    拆装单删除（逻辑） 
	 *
	 */
	EXPORT(0xc05e1814) uint32_t DeleteDisassembleBill(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 const std::set<uint64_t> & setDisassemblebillSysNos,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::map<uint64_t,uint32_t> & mapErrorCode,
		 std::map<uint64_t,std::string> & mapErrorMsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    拆装单修改 
	 *
	 */
	EXPORT(0xc05e1815) uint32_t UpdataDisassembleBill(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 const erp::storage::ddo::CDisassembleBillDdo& oDisassembleBillInfo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    拆装单查询（主键） 
	 *
	 */
	EXPORT(0xc05e1816) uint32_t GetDisassembleBillBySysNos(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const std::set<uint64_t> & setDisassembleBillSysnoList,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::vector<erp::storage::ddo::CDisassembleBillDdo> & vecDisassembleBillList,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    拆装单列表（列表过滤） 
	 *
	 */
	EXPORT(0xc05e1817) uint32_t GetDisassembleBillList(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::storage::ddo::CDisassembleBillFilterDdo& oDisassembleBillFilter,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 uint32_t& dwTotal,
		 std::vector<erp::storage::ddo::CDisassembleBillDdo> & vecDisassembleBillList,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    盘点单创建 
	 *
	 */
	EXPORT(0xc05e1818) uint32_t AddStockCheck(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 const erp::storage::ddo::CStockCheckMasterDdo& oStockCheckMasterInfo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve,
		 uint64_t& ddwStockCheckMasterSysNo
		);

	 /**
	 *
	 *    盘点单删除（逻辑） 
	 *
	 */
	EXPORT(0xc05e1819) uint32_t DeleteStockCheck(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 const std::set<uint64_t> & setStockCheckMasterSysNos,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::map<uint64_t,uint32_t> & mapErrorCode,
		 std::map<uint64_t,std::string> & mapErrorMsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    盘点单修改 
	 *
	 */
	EXPORT(0xc05e1820) uint32_t UpdataStockCheck(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 uint32_t dwOption,
		 const erp::storage::ddo::CStockCheckMasterDdo& oStockCheckMasterInfo,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *    盘点单查询（主键） 
	 *
	 */
	EXPORT(0xc05e1821) uint32_t GetStockCheckBySysNos(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const std::set<uint64_t> & setStockCheckMasterSysNoList,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 std::vector<erp::storage::ddo::CStockCheckMasterDdo> & vecStockCheckList,
		 std::string& strOutReserve
		);

	 /**
	 *
	 *   盘点单列表（列表过滤） 
	 *
	 */
	EXPORT(0xc05e1822) uint32_t GetStockCheckList(
		 const CCntlInfo& rCntlInfo,
		 const std::string& strMachineKey,
		 const std::string& strSource,
		 uint32_t dwSceneId,
		 const erp::storage::ddo::CStockCheckFilterDdo& oStockCheckFilter,
		 const std::string& strInReserve,
		 std::string& strErrmsg,
		 uint32_t& dwTotal,
		 std::vector<erp::storage::ddo::CStockCheckMasterDdo> & vecStockCheckList,
		 std::string& strOutReserve
		);

SECTION_SELF_DEFINE_START
/**
* 请在这里增加自定义的成员变量和函数，否则无法合并代码
**/
SECTION_SELF_DEFINE_END

private:
	enum DeployMethod m_method;
};

}
}
}

#endif /* _STORAGEDAO_STORAGE_H_ */
